Fixed select dollar column from stage for snowflake#2165
Open
romanoff wants to merge 1 commit intoapache:mainfrom
Open
Fixed select dollar column from stage for snowflake#2165romanoff wants to merge 1 commit intoapache:mainfrom
romanoff wants to merge 1 commit intoapache:mainfrom
Conversation
iffyio
reviewed
Jan 29, 2026
| let args = if self.consume_token(&Token::LParen) { | ||
| Some(self.parse_table_function_args()?) | ||
| } else { | ||
| None |
Contributor
There was a problem hiding this comment.
can we add a test case that doesn't include table function args?
| None | ||
| }; | ||
|
|
||
| let alias = self.maybe_parse_table_alias()?; |
Contributor
There was a problem hiding this comment.
can we add a test case that doesn't include an alias?
| } | ||
|
|
||
| /// Parse a Snowflake stage reference as a table factor. | ||
| /// Handles syntax like: `@mystage1 (file_format => 'myformat', pattern => '...')` |
Contributor
There was a problem hiding this comment.
Can we link to the documentation that supports this syntax?
| && self.peek_keyword_with_tokens(Keyword::SEMANTIC_VIEW, &[Token::LParen]) | ||
| { | ||
| self.parse_semantic_view_table_factor() | ||
| } else if dialect_of!(self is SnowflakeDialect) |
Contributor
There was a problem hiding this comment.
If we need a guard for this I think we would instead use a method on the dialect trait (we're moving away from the dialect_of macro for new code). But I think the guard shouldn't be needed in the first place? so that if we see a SELECT * FROM @foo T we can always accept it regardless of dialect?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed this query for snowflake:
Documentation:
https://docs.snowflake.com/en/user-guide/querying-stage#example-1-querying-columns-in-a-csv-file
Specifically
t.$1part didn't work before